import imp
import tornado.web
from views.user import UserHandler,LoginHandler,User1Handler
from views.roles import RolesHandler
from views.resource import ResourceHandler
from views.index import IndexHandler
from views.pre.openbank import OpenbankHandler
from views.pre.landmarks import LandmarkHandler
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
settings = {
    "MEDIA_ROOT": os.path.join(BASE_DIR, "newpro/media"),
    'debug' : True
}




def getapp():
    app = tornado.web.Application([
        (r"/",IndexHandler),
        (r"/user1",UserHandler),
        (r"/roles",RolesHandler),
        (r"/resource",ResourceHandler),
        (r'/login',LoginHandler),
        (r'/user/callback',User1Handler),
        (r'/userbank',OpenbankHandler),
        (r'/mark',LandmarkHandler),
    ],**settings)
    return app